home *** CD-ROM | disk | FTP | other *** search
/ All for Cell Phones: Sony Ericsson / Sony-Ericsson 2004.iso / Java / Kool / Kool.jar / kool / KoolScreen$2.class (.txt) < prev    next >
Encoding:
Java Class File  |  2001-12-24  |  1.1 KB  |  30 lines

  1. package kool;
  2.  
  3. import gamelib.GameAction;
  4.  
  5. class KoolScreen$2 extends GameAction {
  6.    int[][] anim;
  7.    int animCount;
  8.    // $FF: synthetic field
  9.    private final KoolScreen this$0;
  10.  
  11.    KoolScreen$2(KoolScreen this$0) {
  12.       this.this$0 = this$0;
  13.       this.anim = new int[][]{{0, -2}, {0, -4}, {1, -2}, {2, 1}, {2, 4}, {3, 7}, {3, 11}, {3, 15}};
  14.       this.animCount = 0;
  15.    }
  16.  
  17.    public void performAction() {
  18.       this.this$0.player.setPosition(this.this$0.player.getXPosition() + this.anim[this.animCount][0], this.this$0.player.getYPosition() + this.anim[this.animCount++][1]);
  19.    }
  20.  
  21.    public boolean isOver() {
  22.       boolean over = this.animCount >= this.anim.length;
  23.       if (over) {
  24.          KoolScreen.access$0(this.this$0, 4);
  25.       }
  26.  
  27.       return over;
  28.    }
  29. }
  30.